/**
 * 
 */
package nc.ui.pr.pr1110;

import java.util.Hashtable;

import nc.bs.framework.common.NCLocator;
import nc.itf.fdc.pub.IFdcPubServ;
import nc.ui.pr.pub.bsdelegate.PRBusinessDelegator;
import nc.vo.crmbd.pub.PRRentCusfrmodeVO;
import nc.vo.fdc.pub.QueryInfoVO;
import nc.vo.pr.pr1110.RentBailVO;
import nc.vo.pr.pr1110.RentBrdcatVO;
import nc.vo.pr.pr1110.RentExtractstandVO;
import nc.vo.pr.pr1110.RentFinancesplitVO;
import nc.vo.pr.pr1110.RentFreeVO;
import nc.vo.pr.pr1110.RentHouseVO;
import nc.vo.pr.pr1110.RentLesseeVO;
import nc.vo.pr.pr1110.RentSplitVO;
import nc.vo.pr.pr1110.RentStandardVO;

/**
 * @author ssd
 *
 */
public class PRRentPactDelegater extends PRBusinessDelegator {
	
	
	private String[] m_ChildrenVoNames = new String[]{
			RentBailVO.class.getName(),
			RentLesseeVO.class.getName(),
			RentHouseVO.class.getName(),
			RentStandardVO.class.getName(),
			RentSplitVO.class.getName(),
			RentFinancesplitVO.class.getName(),
			RentBrdcatVO.class.getName(),
			RentFreeVO.class.getName(),
			PRRentCusfrmodeVO.class.getName(),
			RentExtractstandVO.class.getName()
	};  
	
	public Hashtable loadChildDataAry(String[] tableCodes, String key)
			throws java.lang.Exception {
//		Hashtable retHt = new Hashtable();
//		if(m_ChildrenVoNames != null){
//			for(int i=0; i<m_ChildrenVoNames.length; i++){
//				
//				CircularlyAccessibleValueObject[] childVOs = queryBodyAllData(Class.forName(m_ChildrenVoNames[i]), IBillType.MANAGEMENT_NODE_RENTPACT, key, null);
//				if(childVOs != null){
//					retHt.put(tableCodes[i], childVOs);
//				}				
//			}			
//		}		
//		return retHt;
		
		String where = "pk_pact='" + key + "' and isnull(dr,0)=0";
		QueryInfoVO[] vos = new QueryInfoVO[]{
				new QueryInfoVO(tableCodes[0], RentBailVO.class, where),
				new QueryInfoVO(tableCodes[1], RentLesseeVO.class, where),
				new QueryInfoVO(tableCodes[2], RentHouseVO.class, where),
				new QueryInfoVO(tableCodes[3], RentStandardVO.class, where),
				new QueryInfoVO(tableCodes[4], RentSplitVO.class, where),
				new QueryInfoVO(tableCodes[5], RentFinancesplitVO.class, where),
				new QueryInfoVO(tableCodes[6], RentBrdcatVO.class, where),
				new QueryInfoVO(tableCodes[7], RentFreeVO.class, where),
				new QueryInfoVO(tableCodes[8], PRRentCusfrmodeVO.class, where),
				new QueryInfoVO(tableCodes[9], RentExtractstandVO.class, where),
		};
		return NCLocator.getInstance().lookup(IFdcPubServ.class).queryChildDatas(vos);
	}
}
